//
//  FGVideoMessageCellData.h
//  FGChatKit
//
//  Created by Henry on 2021/6/3.
//

#import "FGMessageCellData.h"

NS_ASSUME_NONNULL_BEGIN

/// 视频
@interface FGVideoItem : NSObject

@property (nonatomic, strong) NSString *uuid;
@property (nonatomic, strong) NSString *type;
@property (nonatomic, strong) NSString *url;

@property (nonatomic) NSInteger length;
@property (nonatomic) NSInteger duration;

- (NSString *)getName;
- (NSString *)getPath:(NSString *)convId;

- (void)downloadPath:(NSString *)path progress:(FGDownloadProgress)progress succ:(FGSucc)succ fail:(FGFail)fail;

@end

/// 封面
@interface FGSnapshotItem : NSObject

@property (nonatomic, strong) NSString *uuid;
@property (nonatomic, strong) NSString *type;
@property (nonatomic, strong) NSString *url;

@property (nonatomic) CGSize size;
@property (nonatomic) NSInteger length;

- (NSString *)getName;
- (NSString *)getPath:(NSString *)convId;

- (void)downloadPath:(NSString *)path progress:(FGDownloadProgress)progress succ:(FGSucc)succ fail:(FGFail)fail;

@end

@interface FGVideoMessageCellData : FGMessageCellData

@property (nonatomic, strong) UIImage *thumbImage;
@property (nonatomic, strong) NSString *videoPath;
@property (nonatomic, strong) NSString *snapshotPath;

@property (nonatomic, strong) FGVideoItem *videoItem;
@property (nonatomic, strong) FGSnapshotItem *snapshotItem;

@property (nonatomic, assign) NSUInteger uploadProgress;
@property (nonatomic, assign) NSUInteger thumbProgress;
@property (nonatomic, assign) NSUInteger videoProgress;

- (void)loadThumb;
- (void)loadVideo;

@end

NS_ASSUME_NONNULL_END
